<?php echo $this->fetch('member.header.html'); ?>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
	$('.checkitem').attr('checked', false);//用于删除时返回复选框全部取消
});
</script>
<style type="text/css">
</style>
<div class="content_color">
<div class="content">
<?php echo $this->fetch('member.menu.html'); ?>
<div id="right">
<?php echo $this->fetch('member.submenu.html'); ?>
<div class="wrap">
  <div class="searchTop">
  <form method="get">
    <input type="hidden" name="app" value="my_kdyubao" />
    状态：<select name="status">
	<option value="-1">所有记录</option>
	<option value="0" <?php if ($_GET['status'] == '0'): ?>selected="selected"<?php endif; ?>>未入库</option>
    <option value="1" <?php if ($_GET['status'] == '1'): ?>selected="selected"<?php endif; ?>>已入库</option>
	<option value="2" <?php if ($_GET['status'] == '2'): ?>selected="selected"<?php endif; ?>>已发出</option>
    <option value="3" <?php if ($_GET['status'] == '3'): ?>selected="selected"<?php endif; ?>>转仓件</option>
    <option value="4" <?php if ($_GET['status'] == '4'): ?>selected="selected"<?php endif; ?>>问题件</option> 
    <option value="5" <?php if ($_GET['status'] == '5'): ?>selected="selected"<?php endif; ?>>待认领</option>
    <option value="6" <?php if ($_GET['status'] == '6'): ?>selected="selected"<?php endif; ?>>已取消</option>   
	</select>
    关键词：<input class="queryInput" type="text" name="key" value="<?php echo htmlspecialchars($_GET['key']); ?>" placeholder="商品名称、包裹运单号" style="width:220px"/>&nbsp;
    添加时间：<input type="text" value="<?php echo $_GET['add_time_from']; ?>" id="add_time_from" name="add_time_from" class="pick_date" /> 至
    <input type="text" value="<?php echo $_GET['add_time_to']; ?>" id="add_time_to" name="add_time_to" class="pick_date" />
    <input type="submit" class="formbtn" value="查询" />
  </form>
  </div>
  
  <form action="" method="post" id="form_post" target="_blank">
  <div class="public_select table">
  <table width="100%" cellspacing="0">
    <tr class="gray">
      <th width="20" class="firstCell"><input type="checkbox" class="checkall" /></th>
        <th>包裹预报运单号</th>
        <th width="80">状态</th>
        <th width="250">物品名称</th>
        <th>物品数量</th>
        <th>物品价值</th>
        <th>物品重量</th>
        <th>添加时间</th>
        <th>操作</th>
    </tr>
    <?php $_from = $this->_var['yubaos']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');$this->_foreach['_goods_f'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['_goods_f']['total'] > 0):
    foreach ($_from AS $this->_var['list']):
        $this->_foreach['_goods_f']['iteration']++;
?>
    <tr class="line">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php if ($this->_var['list']['status'] == 0): ?><?php echo $this->_var['list']['yubao_id']; ?><?php endif; ?>" <?php if ($this->_var['list']['status'] > 0): ?>disabled="disabled"<?php endif; ?>/></td>
        <td class="left_style"><?php echo htmlspecialchars($this->_var['list']['PostOfficeID']); ?>:<?php echo htmlspecialchars($this->_var['list']['yundanhao']); ?></td>
        <td><?php if ($this->_var['list']['status'] == '0'): ?><font color="#f00">未入库</font>
        <?php elseif ($this->_var['list']['status'] == '1'): ?><font color="#009966">已入库</font>
        <?php elseif ($this->_var['list']['status'] == '2'): ?><font color="#FF9900">已发出</font>
        <?php elseif ($this->_var['list']['status'] == '3'): ?><font color="#3399CC">转仓件</font>
        <?php elseif ($this->_var['list']['status'] == '4'): ?><font color="#00f">问题件</font>
        <?php elseif ($this->_var['list']['status'] == '5'): ?><font color="#FF00FF">待认领</font>
        <?php elseif ($this->_var['list']['status'] == '6'): ?><font color="#999">已取消</font>
        <?php endif; ?></td>
        <td width="250" style="line-height:120%"><?php echo $this->_var['list']['GoodsName']; ?></td>
        <td><?php echo $this->_var['list']['GoodsCount']; ?></td>
        <td>$<?php echo $this->_var['list']['GoodsWorth']; ?></td>
        <td><?php echo $this->_var['list']['GoodsWeight']; ?> LB</td>
        <td><?php echo local_date("Y-m-d",$this->_var['list']['addtime']); ?></td>
        <td><?php if ($this->_var['list']['status'] == 0): ?><a href="javascript:drop_confirm('删除后不可恢复，您确定要删除吗','index.php?app=my_kdyubao&act=drop&id=<?php echo $this->_var['list']['yubao_id']; ?>');" class="links">删除</a><?php endif; ?></td>
    </tr>   
    <?php endforeach; else: ?>
    <tr class="line">
      <td colspan="9" style="padding:8px; color:#F00; text-align:center; font-size:14px;">没有相关记录</td>
        </tr>      
    <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </table>
  </div>
  </form>
  <table width="100%" cellspacing="5">
    <tr>
      <td height="35"><label><input type="checkbox" id="all2" class="checkall"/> 全选</label>
      <a href="javascript:void(0);" uri="index.php?app=my_kdyubao&amp;act=drop&page=<?php echo $this->_var['page_info']['curr_page']; ?>" ectype="batchbutton" name="id" class="lcj_btn" presubmit="confirm('确定要删除选择的记录吗？删除后不可恢复，请谨慎操作');">删除</a>
      </td>
      <td><?php echo $this->fetch('member.page.bottom.html'); ?></td>
    </tr>      
  </table>    
</div></div>
<div class="clear"></div>
</div>
</div>
<?php echo $this->fetch('footer_member.html'); ?>